package com.huang.controller;

import com.huang.model.Result;
import com.huang.model.response.CategoryOptionResp;
import com.huang.service.CategoryService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 分类控制器
 *
 * @author Ikaros
 * @since 2025/9/26 10:49 星期五
 */
@RestController
@RequiredArgsConstructor
public class CategoryController {

    private final static String TAG = "分类模块";

    private final CategoryService categoryService;


    /**
     * 查看分类选项
     *
     * @return {@link Result<CategoryOptionResp>} 分类列表
     */
    @GetMapping("/admin/category/option")
    public Result<List<CategoryOptionResp>> listCategoryOption() {
        return Result.success("分类选项获取成功！", categoryService.listCategoryOption());
    }
}
